import request from '../utils/request'
export const getRepairListAPI = (current, pageSize) => {
  return request.get('/repair', {
    current,
    pageSize
  })
}
export const getRepairDetailAPI = (id) => {
  return request.get(`/repair/${id}`)
}
//获取维修项目
export const getRepairItemAPI = () => {
  return request.get('/repairItem')
}
export const addRepairItemAPI = ({
  id,
  houseId,
  repairItemId,
  mobile,
  appointment,
  description,
  attachment
}) => {
  return request.post('/repair', {

    id,
    houseId,
    repairItemId,
    mobile,
    appointment,
    description,
    attachment

  })
}
export const  cancelRepairAPI = (id) => {
  return request.put(`/cancel/repaire/${id}`)
}
